-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new joint range limiter for hardware interfaces #5
base: add-simple-joint-limiter
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going the same way with JointStaturation Limiter when extending for double
limits. What I see here that we have very similar calculation in the RangeLimmiter and the JointSaturationLimiters. So here the question. Why not to add additional on_enfoce
method to the interface that implements also this kind of limiting and then extend JointSatutrationLimiter
(where we reuse most of the calculations).
This way we make sure that when we implement actually another type of limiter, we will make sure that all methods are implemtend too.
@@ -70,55 +69,58 @@ class JointLimiterInterface | |||
// TODO(destogl): get limits from URDF | |||
|
|||
// Initialize and get joint limits from parameter server | |||
for (size_t i = 0; i < number_of_joints_; ++i) | |||
if (has_parameter_interface()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why to check this? is it possible that this happens? This is a mandatory paramter, so I would propose to check this differently, i.e., not add big if, but just exit the method with error if this argument is not correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are integrating this inside the ResourceManager/ResourceStorage right now we don't have this, and may be we don't want to log things in realtime, that's one more reason for it to check if this interface is set or not. I think it is important.
node_logging_itf_ = logging_itf; | ||
updated_limits_.writeFromNonRT(joint_limits_); | ||
|
||
if ((number_of_joints_ != joint_limits_.size()) && has_logging_interface()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should check if logger is provided differently. This is a bit strange way to do that. Maybe to add setter that returns error if value is not correct. Because we are checking function arguments using external method. I don't find this very nicely solved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And also you are doing check after everyting is assigned. Should't we do this at the begin of the method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can change it to use it properly. This is a new init
method and this will take a vector of LimitsType and you will need to check if this size is good or not w.r.t joint_names size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add the JointLimits into the SoftLimits
* \param[in,out] desired_joint_states physical quantity that should be adjusted to obey the | ||
* limits. \returns true if limits are enforced, otherwise false. | ||
*/ | ||
JOINT_LIMITS_PUBLIC bool on_enforce(std::vector<double> & /*desired_joint_states*/) override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here we shouldn't have the argument name commented out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK make sense. I will remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going the same way with JointStaturation Limiter when extending for double
limits. What I see here that we have very similar calculation in the RangeLimmiter and the JointSaturationLimiters. So here the question. Why not to add additional on_enfoce
method to the interface that implements also this kind of limiting and then extend JointSatutrationLimiter
(where we reuse most of the calculations).
This way we make sure that when we implement actually another type of limiter, we will make sure that all methods are implemented too.
@destogl sorry that I didn't leave any proper description in the PR. I went through the math inside your
What do you think about it? |
@destogl thanks for taking time to do the review. I have left my comments, we can discuss it over here or over a call as you prefer. |
After the call, We have decided to the merge the joint_range_limiter into the joint_saturation_limiter. So the idea is to reuse the header of the We have also discussed about adding the hard limits into the SoftLimits struct or create a whole new structure with hard_limits and optional soft limits, some thing like below
|
f1d5209
to
cb115c6
Compare
…r) (#6) * Merge error handling possilibity on read and write. * Ros2 control extensions rolling joint limits plugins (#5) * Added initial structures for joint-limit plugins. * Move Ruckig limiter to package joint_limits_enforcement_plugins and make it working. Co-authored-by: AndyZe <zelenak@picknik.ai> * Add option to automatically update parameters after getting them from parameter server. * Modify simple joint limiting plugin (same as changes to moveit2 filter) * Add backward_ros dependency for crash stack trace * Check for required inputs in simple joint limiter * Change services history QOS to 'keep all' so client req are not dropped * Add missing on 'pluginlib' dependency explicitly. * Update ControllerParameters structure to support custom prefix and use in filters. * Update messge. * Change controller param changed msg log level to info instead of error --------- Co-authored-by: Denis Štogl <destogl@users.noreply.github.com> Co-authored-by: AndyZe <zelenak@picknik.ai> Co-authored-by: bijoua <bijou.abraham@technipfmc.com> Co-authored-by: bijoua29 <73511637+bijoua29@users.noreply.github.com>
73dd1e1
to
3b3dcb3
Compare
…uration limiter + merge them into a single library
…n availability case
…celeration limits
eee94bd
to
415ea20
Compare
Add new hardware joint range limiter to integrate in the resource_manager